package com.lineengine.lineengine;

import com.lineengine.lineengine.context.MyContext;
import com.lineengine.lineengine.engine.MyEngine;
import com.lineengine.lineengine.node.FirstNode;
import com.lineengine.lineengine.node.SecondNode;
import com.lineengine.lineengine.pipeline.SequencePipeline;
import com.lineengine.lineengine.result.IResult;
import org.junit.jupiter.api.Test;


class Mytest {

	@Test
	void testEngine() {

		FirstNode firstNode = new FirstNode();
        SecondNode secondNode = new SecondNode();

        SequencePipeline<MyContext> sequencePipeline = new SequencePipeline.Builder<MyContext>()
                .add(firstNode)
                .add(secondNode)
                .build();

        MyContext myContext = new MyContext();

        MyEngine myEngine = new MyEngine();

        IResult<MyContext> result = myEngine.process(sequencePipeline, myContext);

        System.out.println(result.getMessage());
	}

}
